import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class NOramelrshit here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Normal extends Plattform
{   
    public Normal(int h, int b, int m){
        movementspeed = m;
        höhe = h;
        breite = b;
    }
    
    public void act() 
    {   
        bewegen();
        getImage().scale(breite,höhe);
    }    

    public void bewegen(){
            if(nachRechts == true){
                setLocation(getX()+movementspeed,getY());
                zaehler++;
            } else {
                setLocation(getX()-movementspeed,getY());
                nachRechts = false;
                zaehler--;
            }

            if(zaehler == reichweite){
                nachRechts = false;
            } else if(zaehler == 0){
                nachRechts = true;
            }
        
    }
}
